The present invention relates to a continuous gradation compression apparatus and method, a continuous gradation expansion apparatus and method, and a data processing electron device and memory medium in which programs for executing the methods are stored, particularly to an image compression apparatus for converting/compressing image data.
Recent improvements in the performance of computers have enabled significant developments in the field of computer graphics technology, realizing images with abundant color and high resolution. The computer graphics technology is being increasingly applied to photograph processing and printing, and also to the field of games.
A known computer graphics technology is the bit map method. According to this method, an image is composed of many pixels. These pixels express color and brightness by holding brightness data for the three. primary light colors red (R), green (G) and blue (B). The more the volume of the RGB data (number of bits), the more detailed the expressed color and brightness, and the more the number of pixels, the finer the obtained image. Accordingly, a high quality image can be expressed by processing a very large amount of data. Recent improvements in the performance of microprocessors and an increased capacity of external memories such as semiconductor memories and hard discs have overcome this issue, providing computer graphics of a satisfactory level.
However, there were also demands for even higher quality images such as images with little roughness after enlargement, required for printing catalogues, etc. To meet such demands, there was a need to develop an algorism that efficiently utilizes the limited microprocessor performance and memory capacity. According to one such method, image data are efficiently compressed, and then expanded to express fine images.
Conventionally, it is known to convert and compress image data composed of color data for each pixel. As the volume of each pixel data is very large, this method is often used for storing such data or for transmitting such data via a network.
On the other hand, data compressed through various methods are expanded to restore the image in order to display such image on the screen of a display apparatus, but it is not guaranteed that the same image as the original will be restored.
If not the same image as the original is restored, it is often a rougher image than the original. Therefore, users were mostly unsatisfied with the quality of the restored image displayed on the display screen or printed via a printer. In fields where the image quality is particularly important, such as when printing catalogues, current computer graphics technologies did not reach the commercial level. In other words, it was required to compose images of more pixels and to increase the number of bits for the RGB data of each pixel.
Although it is well-known to display enlarged images on a display screen or print them by a printer, the enlargement rate was limited to whole numbers (e.g., 2, 4, or 8 times), and the obtained image tended to become rougher with larger enlargement rates. Therefore, it was required to compose images of more pixels and to increase the number of bits for the RGB data of one pixel.
However, there were constraints from the aspect of hardware performance. Therefore, an algorism was required that effectively utilizes the limited hardware performance to obtain effects similar to those aimed above.
An object of the present invention is to provide an image processing apparatus that offers good images after compression and expansion.
A further object of the present invention is to provide an image processing apparatus that can enlarge images as desired and offers good images after enlargement.
The continuous gradation compression apparatus according to the present invention comprises:
data division means which divides a plurality of data constituting image or acoustic data into groups of predetermined ranges;
formula calculation means which expresses each of the divided plurality of groups in relation with a data value corresponding to a position within the predetermined range as a polynomial equation having said position as the variable; and
coefficient calculation means which calculates the coefficients to be assigned to each variable of said polynomial equation,
wherein the coefficient data obtained by said coefficient calculation means for each of the divided plurality of groups is output as compressed data within said predetermined range.
According to the present invention, corresponding data are expressed as a polynomial equation of a position within a predetermined range, so data can be expressed in an adequate manner. Compressed data need only show a certain range and coefficients, so it is possible to improve the data compression efficiency.
In the continuous gradation compression apparatus according to the present invention, the formula calculation means obtains at least the maximum value and/or the minimum value of the data value. For example, when solving a second formula yxe2x80x2=3ax2+2bx+c, which is the differential function of a first formula y=ax3+bx2+cx+d, it is possible to set yxe2x80x2=0 for the maximum and/or minimum value, so it is possible to easily obtain the coefficients. Furthermore, through this process, only at least three (x, y) pairs need to be detected, so it is possible to make this processing simple and high-speed.
The continuous gradation expansion apparatus according to the present invention that receives the coefficient data from any one of the continuous gradation compression apparatuses above and restores the image or acoustics based on the data, comprises:
polynomial equation calculation means which inserts said coefficient in a predetermined polynomial equation; and
expansion means which calculates the data value corresponding to the position based on the polynomial equation calculated by said polynomial equation calculation means,
wherein said data value obtained by said expansion means is output as image or acoustic data.
The continuous gradation expansion apparatus according to the present invention further comprises:
scale factor fixing means; and
interpolation means which calculates said position based on said scale factor, and, based on the polynomial equation calculated by said polynomial equation calculation means, calculates the data value corresponding to the position calculated based on said scale factor, and thereby calculates positional data that is different from the original data. Thereby, it is possible to interpolate the data value corresponding to the position between the original positions in an adequate manner, so the image quality or sound quality is not deteriorated in obtaining enlarged images or acoustics.
The data processing apparatus according to the present invention is constituted of any of the continuous gradation compression apparatuses above and any of the continuous gradation expansion apparatuses above.
The continuous gradation compression method according to the present invention comprises the steps of:
dividing a plurality of data constituting image or acoustic data into groups of predetermined ranges;
expressing each of the divided plurality of groups in relation with a data value corresponding to a position within the predetermined range as a polynomial equation having said position as the variable;
calculating the coefficients to be assigned to each variable of said polynomial equation; and
outputting the coefficient data obtained at said coefficient calculation step for each of the divided plurality of groups as compressed data within said predetermined range.
The continuous gradation expansion method according to the present invention that receives the coefficient data obtained by the continuous gradation compression method above and restores the image or acoustics based on the data comprises the steps of:
inserting said coefficient in a predetermined polynomial equation;
calculating the data value corresponding to the position based on the polynomial equation calculated at said polynomial equation calculation step; and
outputting said data value obtained by said expansion means as image or acoustic data.
The data processing electron device according to the present invention comprises:
a processing unit which performs compression processing and expansion processing of input image or acoustics data;
a memory for storing compressed data;
a digital-to-analog converter which converts expanded data into analog signals; and
a controlling unit which controls said processing unit,
wherein said processing unit comprises:
data division means which divides a plurality of data constituting image or acoustic data into groups of predetermined ranges;
formula calculation means which expresses each of the divided plurality of groups in relation with a data value corresponding to a position within the predetermined range as a polynomial equation having said position as the variable;
coefficient calculation means which calculates the coefficients to be assigned to each variable of said polynomial equation,
compressed data output means which outputs the coefficient data obtained by said coefficient calculation means for each of the divided plurality of groups as compressed data within said predetermined range
polynomial equation calculation means which inserts said coefficient in a predetermined polynomial equation;
expansion means which calculates the data value corresponding to the position based on the polynomial equation calculated by said polynomial equation calculation means; and
expanded data output means which outputs said data value obtain by said expansion means as image or acoustic data.
The memory medium storing a program according to the present invention comprises the steps of:
dividing a plurality of data constituting image or acoustic data into groups of predetermined ranges;
expressing each of the divided plurality of groups in relation with a data value corresponding to a position within the predetermined range as a polynomial equation having said position as the variable;
calculating the coefficients to be assigned to each variable of said polynomial equation; and
outputting the coefficient data obtained at said coefficient calculation step for each of the divided plurality of groups as compressed data within said predetermined range.
The memory medium storing a program according to the present invention comprises the steps of:
inserting said coefficient in a predetermined polynomial equation;
calculating the data value corresponding to the position based on the polynomial equation calculated at said polynomial equation calculation step; and
outputting said data value obtain by said expansion means as image or acoustic data.
The media may be, for example, a floppy disc, hard disc, magnetic tape, magneto-optic disc, CD-ROM, DVD, ROM cartridge, RAM memory cartridge with battery backup, flash memory cartridge, non-volatile RAM cartridge. Also included are telephone lines and other cable communications media, and microwave circuits and other wireless communications media. The Internet is included in the communications media. Media is defined as any kind of physical means for storing information (mainly digital data, programs), used to causing computers, dedicated processors and other processing apparatuses to perform certain functions. In other words, this may be any means for downloading programs onto a computer and for causing the computer to implement certain functions.